/**
 * 历史版本信息 引用JS文件
 */

//初始化页面加载
$(function(){
	pageList(1);
});

function pageList(){
	
	$.ajax({
		url : "../self/scoredInfo",
		type : "post",
		dataType : "json",
		data : {"uniqueCode":uniqueCode},
		success : function(data){
			
			console.log(data);

			if(data == null || data == -1){
				return;
			}
			
			$("#sp_name").html(data.obj.PERSON_LIABLE_NAME);
			$("#sp_time").html(okrTime(data.obj.O_YEAR,data.obj.O_QUARTER,data.obj.O_MONTH));
			
			if(data.krScores.length == 0){
				$("#list").html('<div class="mui-card" style=""><div class="mui-card-footer"><p class="index-status" style="text-align:center; width:100%;margin-top:3%;">暂无信息</p></center></div>');
				return;
			}
			
			$("#list").html("");
			var str = "";  
			$.each(data.krScores,function(n,value) {
				str += '<div class="mui-card" style="">';
				str += '<div class="mui-card-header">'+value.KR_CODE+'<span style="float: right;"></span>';
				str += '</div>';
				str += '<div class="mui-card-content">';
				str += '<div class="mui-card-content-inner">';
				str += '<p class="re-bold">';
				str += '<span>行动计划：</span>' + value.ACTION_PLAN;
				str += '</p>';
				str += '</div>';
				str += '<div class="mui-card-footer cblue">';
				str += '自评（分值）：<span style="float: right;">'+krColor(value.KR_SCORE_ONESELF)+'</span>';
				str += '</div>';
				str += '<div class="noba">';
				str += '<div class="mui-card-footer">自评说明：'+value.KR_SCORE_EXPLAIN_ONESELF+'</div>';
				str += '</div>';
				str += '<div class="mui-card-footer cblue">';
				str += '上级评（分值）：<span style="float: right;">'+krColor(value.KR_SCORE_SUPERIOR)+'</span>';
				str += '</div>';
				str += '<div class="noba">';
				str += '<div class="mui-card-footer">上级评说明：'+value.KR_SCORE_EXPLAIN_SUPERIOR+'</div>';
				str += '</div>';
				str += '</div>';
				str += '</div>';
			});  
			
			$("#list").html(str);
		}
	});
}